home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 40.zip / BS1 part 40 / Doc_disk2.adf / CygnusEd.Doc < prev    next >
Text File  |  1978-11-16  |  15KB  |  385 lines

  1. Professional ACTIVATOR
  2. ============================================
  3.  
  4.  
  5.      The ED command provided on the disk is a small (1.5K) utility which
  6. will summon CED or pass additional files to CED.
  7.  
  8.      When CED is not running, ED (when run from the CLI) will run a copy of
  9. CED and pass CED its filename(s).  For example:
  10.  
  11.      1> ED myfile1 myfile2
  12.  
  13.      will call up a new copy of CED and pass it "myfile1" and "myfile2" as
  14. two new files to load.
  15.  
  16.      When CED is running, ED will not run an additional copy of CED, but
  17. will pass the filename(s) to the existing CED.  If CED is dormant (not
  18. on-screen, but waiting for a HOTKey), then ED will awaken it with the
  19. file(s) specified.  If CED is active with one or more files already
  20. on-screen, then ED will open additional views with the extra files in them,
  21. but will leave the original views active.
  22.  
  23.      A special ED command line is the form:
  24.  
  25.      1> ED myfile -STICKY
  26.  
  27.                                  Page 101
  28.  
  29. ----------------------------------------------------------------------------
  30.  
  31.  
  32.  
  33.      The -STICKY option is valid only at the end of the command and only
  34. when exactly one filename is given.  Normally, ED will pass the file
  35. name(s) to CED and return immediately, allowing other programs to run in
  36. the normal multitasking mode.  The -STICKY option overrides this and will
  37. not release ED until the user quits out of the file specified (in this
  38. case, "myfile1").  This is designed to be used in command files where you
  39. want the execution of the batch file or command script to wait until the
  40. user has finished editing a particular file.  ED will return (using the
  41. sticky option) when the user either quits out of the file, clears the file
  42. or loads a new file in over top of the old one.
  43.  
  44.      ED is very useful in command files.  For example, a command file which
  45. assembles a program may produce an error file and return an error status
  46. when there are errors.  The following script will automatically put the
  47. error file in the editor if errors are present:
  48.  
  49.      ; This batch file called WORKPROJ will continually run until
  50.      ; the file PROJECT.ASM will assemble without any errors
  51.      ;
  52.      Asm >Project.err Project.asm -oproject.o
  53.      If Error
  54.           Ed Project.err -STICKY
  55.           Execute Workproj
  56.      Endif
  57.      ; The Assembly worked - exit batch file
  58.  
  59.      Due to a limitation in the current release of ED, ED will not invoke
  60. CygnusEd Professional if ED was started from the WorkBench and CEDPro was
  61. not already running.  However, invoking ED from the CLI will cause CEDPro
  62. to being running if it was not already either dormant or running.
  63.  
  64.      To run ED from the WorkBench, you can click on the file you want to
  65. edit, and then while holding the shift key down, double click on the ED
  66. icon.  Alternatively you can use the SET ICON TOOL NAME menu option in
  67. CygnusEd Professional to set the default tool name to C:ED so that double
  68. clicking on the file name will run ED which will then pass the file name to
  69. an already running CygnusEd Professional.
  70.  
  71.      When ED runs CygnusEd Professional it looks for it under just the name
  72. 'CED'.  If you call it E or CygnusEd Professional then ED will not be able
  73. to find it.  However, ED will have no trouble finding CygnusEd
  74. Professional, by any name, if CygnusEd Professional is already in memory
  75. (either running or dormant).
  76.  
  77.                                  Page 102
  78.  
  79. ----------------------------------------------------------------------------
  80.  
  81.  
  82.  
  83. ========================================
  84.                Chapter 14
  85.  
  86.   RecoverCedFiles - DISASTER INSURANCE
  87. ========================================
  88.  
  89.  
  90.      Because the Amiga is a multitasking operating system, many users run
  91. several programs at one time.  Unfortunately, the Amiga architecture does
  92. not provide secure error trapping in all cases.  This produces the famed
  93. "Guru Meditation" error.  When a program produces this error, all other
  94. programs (including CED) will stop.  You then have to reboot the computer.
  95.  
  96.      When a machines "crashes" this way, all the data is considered lost.
  97. If you were making changes to a file in CED and did not save the file
  98. before the crash, then those changes are lost.
  99.  
  100.      Fortunately, we have provided a helpful utility program called
  101. RecoverCEDFiles.  This program will scan all the memory trying to find the
  102. CED files as they were in memory when the system crashed.  When it finds
  103. each file, it will report which file it found, the size and the number of
  104. changes that were made since the last time it was saved.  If you want to
  105. save the file, you can specify the filename to save it under using the
  106. standard file requester.
  107.  
  108.                                  Page 103
  109.  
  110. ----------------------------------------------------------------------------
  111.  
  112.  
  113.  
  114.      After a system crash, all memory is returned to a "free memory pool".
  115. This means that the memory that was being used by the CED file buffers is
  116. no longer protected.  Because of this, the memory may become polluted or
  117. the file may be lost entirely.  To be sure to be able to recover the files
  118. after a system crash, run RecoverCEDFiles as soon as possible after you
  119. reboot the computer.  To improve your chances of safely recovering the
  120. files, halt your startup sequence by typing CTRL-D and then run
  121. RecoverCEDFiles IMMEDIATELY!
  122.  
  123.      WARNING:  It is possible that a file in memory may have been damaged,
  124. perhaps completely wiped out, during a crash.  If this happens,
  125. RecoverCEDFiles may still recover the file, and let you save it to disk.
  126. However, what it is recovering may be garbage.  It is VERY important that
  127. you save any recovered files to a temporary file name and that you verify
  128. that the file is intact before copying it over your previous copy.
  129.  
  130.      To run RecoverCEDFiles from the CLI, just enter:
  131.  
  132.      1> RECOVERCEDFILES
  133.  
  134.      To run RecoverCEDFiles from the workbench, double click on its icon.
  135.  
  136.      RecoverCEDFiles does take a few seconds to run.  About one second for
  137. every megabyte of memory you have.  While it is searching memory it locks
  138. out all other tasks, including Intuition.  This means that your mouse
  139. pointer freezes while it is looking.  DON'T PANIC.  This is normal and
  140. should only last a few seconds.
  141.  
  142.                                  Page 104
  143.  
  144. ----------------------------------------------------------------------------
  145.  
  146.  
  147.  
  148. ==============================
  149.           Chapter 15
  150.  
  151.   TECHNICAL SUPPORT SERVICES
  152. ==============================
  153.  
  154.  
  155. 15.1  Technical Support
  156.  
  157.      Should you run into any problems with the supplied disk or manual or
  158. have questions pertaining to the operation of CygnusEd Professional
  159. contact:
  160.  
  161.                              ASDG Incorporated
  162.                             925 Stewart Street
  163.                          Madison, Wisconsin 53713
  164.                               (608) 273-6585
  165.  
  166.      If you are reporting a problem with the editor software, please
  167. provide a description of what functions you where doing when the problem
  168. appeared.  Please provide as many details as possible - this will greatly
  169. aid our software team in correcting the problem quickly.
  170.  
  171.  
  172. 15.2  Network Support
  173.  
  174.      ASDG staff is available to answer your questions and assist you in
  175. solving problems relating to CygnusEd Professional on three major computer
  176. networks.
  177.  
  178.                                  Page 105
  179.  
  180. ----------------------------------------------------------------------------
  181.  
  182.  
  183.  
  184.      1.  The Byte Information eXchange
  185.  
  186.      2.  Compuserve
  187.  
  188.      3.  UseNet
  189.  
  190.      On BIX and Compuserve, ASDG support is rendered in formal support
  191. areas.  On BIX type
  192.  
  193.      join asdg
  194.  
  195.      The formal support group on Compuserve is still in the process of
  196. being set up at the time of this writing.  Support on UseNet is informal.
  197.  
  198.                                  Page 106
  199.  
  200. ----------------------------------------------------------------------------
  201.  
  202.  
  203. end of document, phew!
  204. first allocate a
  205. CedMsg structure.  The C language declaration for this structure is:
  206.  
  207. struct CedMsg {
  208.         struct Message  cm_Node;
  209.         LONG            RFU1;
  210.         LONG            RFU2;
  211.         LONG            rm_Action;
  212.  
  213.                                   Page 94
  214.  
  215. ----------------------------------------------------------------------------
  216.  
  217.  
  218.  
  219.         LONG            rm_Result1;
  220.         LONG            rm_Result2;
  221.         char            *cm_Args[16];
  222.         LONG            RFU7;
  223.         LONG            RFU8;
  224.         LONG            RFU9;
  225.         LONG            RFU10;
  226.         LONG            RFU11;
  227.         LONG            RFU12;
  228. }:
  229.  
  230.      Only some of these fields are needed.  The others are for use with
  231. ARexx only.  The most important field is the cm_Args field or, to be more
  232. precise, cm_Args[0].  All commands to CygnusEd Professional are null
  233. terminated strings and a pointer to those strings is always put into
  234. cm_Args[0].  If you are merely interested in sending commands to CygnusEd
  235. Professional and don't care about getting results back you can ignore all
  236. of the other fields.
  237.  
  238.      The rm_Action field is a flag field.  The only flag we are interested
  239. in is the RXFB_RESULT flag, which is bit 17 (counting from zero).  When
  240. this bit is set, CygnusEd Professional will return results if appropriate.
  241. The commands that can cause CygnusEd Professional to return results (if
  242. this bit is set) are the status command, the okay1 command, the okay2
  243. command, the getstring command, the getfilename command and any commands
  244. that cause an information requester (with one or two gadgets) to appear.
  245.  
  246.      The rm_Result1 field is used to return any error numbers to the driver
  247. program.  The error numbers and their meanings are documented above.
  248.  
  249.      The rm_Result2 field is used to return results from CygnusEd
  250. Professional when the RXFB_RESULT flag is set in the rm_Action field and a
  251. result returning command is sent to CygnusEd Professional.  If the result
  252. is a number (such as would be returned if you asked for the status of a
  253. flag such as the word wrap flag) then the number itself is in the
  254. rm_Result2 field.  If the result is a string (such as the current line or
  255. the tab stops) then rm_Result2 is a pointer to a string, usually null
  256. terminated (if the contents of a block buffer is returned there may be
  257. other zeroes in the string).  The length of the string is returned in the
  258. previous long word.  It is your responsibility to free up the memory.  The
  259. following routine will do that for you quite handily.
  260.  
  261. FreeMyString(location)
  262. char *location;
  263. {
  264.      long *RealLocation;
  265.  
  266.      if (!location) return;
  267.      RealLocation = (long *)location;
  268.      RealLocation--;
  269.      FreeMem(RealLocation, *RealLocation);
  270. }
  271.  
  272.                                   Page 95
  273.  
  274. ----------------------------------------------------------------------------
  275.  
  276.  
  277.  
  278.      To send a message to CygnusEd Professional you need to follow these
  279. steps.  Put a pointer to your command string (all ascii, including any
  280. numbers) in cm_Args[0].  The cm_Node.mn_Node.ln_Type field should be filled
  281. with NT_MESSAGE, an Amiga constant.  The cm_Node.mn_Length field should be
  282. filled with sizeof(struct CedMsg).  The rm_Result2 field should be zeroed
  283. to make sure you don't mistakenly think that CygnusEd Professional has
  284. returned a result when it hasn't.  If you want results then the rm_Action
  285. field should be set to 1 shifted left by RXFB_RESULT bits and should be
  286. zeroed otherwise.  Now you need to do a FindPort() on "rexx_ced" to find
  287. out where to send the message to.  You also need to do a
  288. CreatePort("MyPort", 0L) so you will have a return port.  The address of
  289. this return port should be put into cm_Node.mn_ReplyPort.  Now you can send
  290. the message.  You then need to wait for a reply and then delete your reply
  291. port.  The code below does all of this for you.  Note this assumes that you
  292. want results and that you will delete any strings that are returned to you.
  293.  
  294. #define RXFB_RESULT  17
  295. BOOL SendCygnusEdMessageGetReply(thecommand)
  296. char    *thecommand;
  297. {
  298.         TheMessage.cm_Args[0] = thecommand;
  299.         TheMessage.cm_Node.mn_Node.ln_Type = NT_MESSAGE;
  300.         TheMessage.cm_Node.mn_Length = sizeof(struct CedMsg);
  301.         TheMessage.rm_Action = 1L << RXFB_RESULT; /* We do want results. */
  302.         TheMessage.rm_Result2 = 0;     /* clear out the last result. */
  303.         if (!(CedPort = FindPort("rexx_ced"))) return((BOOL)FALSE);
  304.         if (!(MyPort = CreatePort("MyPort", 0L))) return((BOOL)FALSE);
  305.         TheMessage.cm_Node.mn_ReplyPort = MyPort;
  306.         PutMsg(CedPort, &TheMessage);
  307.         WaitPort(MyPort);
  308.         DeletePort(MyPort);
  309.         return((BOOL)TRUE);
  310. }
  311.  
  312.                                   Page 96
  313.  
  314. ----------------------------------------------------------------------------
  315.  
  316.                                   Page 97
  317.  
  318. ----------------------------------------------------------------------------
  319.  
  320.                                   Page 98
  321.  
  322. ----------------------------------------------------------------------------
  323.  
  324.  
  325.  
  326. =========================
  327.        Chapter 12
  328.  
  329.   TECHNICAL INFORMATION
  330. =========================
  331.  
  332.  
  333.      All text editors have limitations - CED tries to put them out of the
  334. reach of normal use.  Here are some of the important limitations:
  335.  
  336.             Maximum document size:  as much memory as you have
  337.                        Maximum number of views:  ten
  338.                    Maximum line length:  1024 characters
  339.  
  340.      The characters interpreted as end-of-line (EOL) characters are the
  341. ASCII values:  0-8 and 10-13.
  342.  
  343.      The characters interpreted as white space characters are TAB (ASCII
  344. 9), SPACE (ASCII 32), and EOL characters.  To force a space character that
  345. will not be stripped out by LAYOUT mode if on the end of line, and will not
  346. be considered a word separator, use ALT-SPACE.
  347.  
  348.      CED is designed to work with either PAL or NTSC monitors (or
  349. high-resolution cards when they become available).
  350.  
  351.      CED will use any keymap set using the standard SETMAP function.  So if
  352. you prefer using a Dvorak keyboard or a german style keyboard - no problem.
  353.  
  354.      The CLI command:
  355.  
  356.      1> SETMAP USA1
  357.  
  358.      will set your keyboard to Dvorak.  Remember that the SETMAP command
  359. must be done BEFORE CygnusEd Professional is run.
  360.  
  361.                                   Page 99
  362.  
  363. ----------------------------------------------------------------------------
  364.  
  365.  
  366.  
  367.      When a file is loaded, it is all loaded into memory at once.  This has
  368. an obvious speed advantage when editing, but the drawback is that the file
  369. size cannot exceed available memory.  Because the Amiga has a lot of memory
  370. this should not be a problem for most users.
  371.  
  372.      CED will automatically dissociate itself from the CLI it is run from.
  373. This means entering:
  374.  
  375.      1> CED myfile
  376.  
  377.      will load CED and then return control immediately to the CLI - you do
  378. not need to 'RUN' it with the RUN command.  You can also use EndCLI with
  379. CED still running and the CLI will be removed.  However, if you want any
  380. DOS commands that you run from CygnusEd Professional (using the DOS/ARexx
  381. interface) to be able to use the CLI window for input and output you should
  382. specify -keepio on the command line.
  383.  
  384.      There are a few minor problems that may occur when you are using
  385. CygnusEd Professional